import service from '@/utils/request'

export const useContractTypeSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/sys/contract/type', dataForm)
	} else {
		return service.post('/sys/contract/type', dataForm)
	}
}

export const useContractTypeListApi = (dataForm: any) => {
	return service.get('/sys/contract/type/page', dataForm)
}

export const useContractTypeApi = (id: number) => {
	return service.get('/sys/contract/type/' + id)
}
